<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <h1>test</h1>

  <button id="btn" click="click">点击</button>
  <p id="content"></p>
  
  <script>
    // let click = function() {
    //   // let data = await fetch('https://www.v2ex.com/api/topics/hot.json')
    //   // let json = await data.json()
  
    //   // console.log(json)
    //   alert("asdfasdfas")
    //   document.querySelector('#content').innerHTML = "fasdfa"
    // }

    // document.querySelector('#btn').addEventListener('click', click, true)

    document.querySelector('#btn').onclick = function() {
      alert(navigator.userAgent.toLocaleLowerCase())
    }
  </script>
</body>
</html>